﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ApplicationRecycleBin.aspx.cs" Inherits="CentralOffice.WebClient.Tasks.ApplicationRecycleBin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
<link rel="stylesheet" type="text/css" href="../theme/2/style.css" />
    <script src="../inc/js/ccorrect_btn.js" type="text/javascript"></script>
</head>
<body class="bodycolor" topmargin="5">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="../images/sys_config.gif" WIDTH="22" HEIGHT="20" align="absmiddle" /><span class="big3">申请查询</span></td>
  </tr>
</table>
    <form id="form1" runat="server">
    <ajaxToolkit:ToolkitScriptManager runat="server" ID="sm"  />
<table class="TableBlock" width="100%" align="center">
   <tr>
       <td nowrap class="TableData">申请名称：</td><td nowrap class="TableData"><asp:TextBox ID="txtName" runat="server" CssClass="BigInput"></asp:TextBox></td>
       <td nowrap class="TableData">申请类别：</td><td nowrap class="TableData"><asp:DropDownList ID="ddlCategory" runat="server"></asp:DropDownList></td>
       <td nowrap class="TableData">申请日期从：</td><td nowrap class="TableData"><asp:TextBox ID="txtDateOfApplication" runat="server" CssClass="BigInput"></asp:TextBox>&nbsp;<img onclick="WdatePicker({el:$dp.$('txtIntendingDate')})" src="../../inc/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle"></td>
   </tr>
   <tr>
       <td nowrap class="TableData">申请人：</td><td nowrap class="TableData"><asp:TextBox ID="txtApplicant" runat="server" CssClass="BigInput"></asp:TextBox><%--<input type="text" id="txtAccepterReadOnly" name="txtDepartmentReadOnly" class="BigInput"  value="" /><asp:HiddenField ID="txtAccepter" runat="server" />&nbsp;<asp:LinkButton ID="btnAddDepartment" runat="server" CssClass="orgAdd">添加</asp:LinkButton><a href="javascript:;" class="orgClear" onclick="$get('txtDepartmentReadOnly').value='';">清空</a>--%></td>
       <td nowrap class="TableData"></td><td nowrap class="TableData"></td>
       <td nowrap class="TableData">到：</td><td nowrap class="TableData"><asp:TextBox ID="txtDateOfApplicationEnd" runat="server" CssClass="BigInput"></asp:TextBox>&nbsp;<img onclick="WdatePicker({el:$dp.$('txtDateOfApplicationEnd')})" src="../../inc/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle"></td>
   </tr>
   <tr>
   <td nowrap class="TableControl" colspan="6" align="center"><asp:Button ID="btnQuery" runat="server" Text="查询"  CssClass="BigButton" OnClick="btnQuery_Click" /></td>
   </tr>
</table>

<div style="margin-top:20px; margin-left:8px;"><h3>查询结果：</h3></div>

<div style="text-align:center">

<asp:UpdatePanel UpdateMode="Conditional" ID="upCompany" runat="server" ChildrenAsTriggers="true">
<ContentTemplate>
    
<huag:OAGridView  id="gv" runat="server" DataKeyNames="Id" AllowSorting="True" 
        skinid="PagingGridView" Width="98%" ConfirmDelete="true"  
        DataSourceID="odsApplication" EnableViewState="false" EnableTruncate="true" 
        MaxTextLength="80" 
        EnableCheck="true" 
        OnRowDataBound="gv_RowDataBound" >
   <Columns>
       <asp:HyperLinkField DataTextField="Name" DataNavigateUrlFormatString="ApplicationView.aspx?id={0}" DataNavigateUrlFields="Id" HeaderText="名称" target="_blank" SortExpression="Name"/>
       <asp:BoundField DataField="Applicant" HeaderText="申请人" SortExpression="Applicant" />
       <asp:BoundField DataField="DateOfApplication" HeaderText="申请日期" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HtmlEncode="false" SortExpression="DateOfApplication" />
       <huag:EnumTypeField DataField="Category" HeaderText="申请类别" CategoryName="approvalObject" />
       <%--<asp:BoundField DataField="ApprovalContent" HeaderText="审批内容"  />--%>
       <huag:EnumTypeField DataField="Status" HeaderText="审批结果" CategoryName="approvalStatus" />
       
       <asp:CommandField ShowDeleteButton="True" DeleteText="删除" />
   </Columns>
</huag:OAGridView>

</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnQuery" />
<asp:AsyncPostBackTrigger ControlID="btnBatchDelete" />
</Triggers>
</asp:UpdatePanel>
<div style="margin-top:8px;" >
<asp:Button ID="btnBatchDelete" runat="server" Text="批量删除" OnClick="btnBatchDelete_Click" CssClass="BigButton" /> &nbsp;&nbsp;&nbsp;
<asp:Button ID="btnBatchRecover" runat="server" Text="批量恢复" OnClick="btnBatchRecover_Click" CssClass="BigButton" />
</div>

<%-- MaximumRowsParameterName="maxRows" StartRowIndexParameterName="startIndex"<asp:Parameter Name="startIndex" Type="Int32" /><asp:Parameter Name="maxRows" Type="Int32" /> <asp:Parameter Name="sortExpression" Type="String"/> --%>
<asp:ObjectDataSource id="odsApplication" runat="server" EnablePaging="True" 
 TypeName="CentralOffice.Task.BusinessActions.Applications" 
 SelectMethod="GetPaged" SelectCountMethod="GetCount"
 DeleteMethod="DeleteById" OnSelecting="odsApplication_Selecting" 
 SortParameterName="sortExpression"  >
    <SelectParameters>      
      <asp:Parameter Name="whereClause" Type="String" />
      <asp:Parameter Name="hideDeleted" Type="Boolean" DefaultValue="False" />
      
    </SelectParameters>
    <DeleteParameters>
    <asp:Parameter Name="isStoredProc" Type="Boolean" DefaultValue="True" />
    <asp:Parameter Name="logical" Type="Boolean" DefaultValue="False" />
    </DeleteParameters>
</asp:ObjectDataSource>
</div>

    </form>
    <script type="text/javascript" src="../inc/js/My97DatePicker/WdatePicker.js"></script>
</body>
</html>
